#pragma once
#include "tools/list.h"
#include "core/task.h"

typedef struct sem_t
{
    int count;              //信号量
    list wait_list;         //等待队列
}sem_t;

void sem_init(sem_t* sem,int init_count);

void sem_wait(sem_t* sem);

void sem_notify(sem_t* sem);

int sem_count (sem_t * sem);